package com.eee.machine.common;

import java.util.Date;

public class OrderBean {

    private Buyer buyer;

    private PayInfo payInfo;

    private TradeSource tradeSource;

    /*商品详情*/
    private OrderItems[] orderItems;

    /*主订单状态
    WAIT_BUYER_PAY （等待买家付款，定金预售描述：定金待付、等待尾款支付开始、尾款待付）；
    TRADE_PAID（订单已支付 ）；
    WAIT_CONFIRM（待确认，包含待成团、待接单等等。即：买家已付款，等待成团或等待接单）；
    WAIT_SELLER_SEND_GOODS（等待卖家发货，即：买家已付款）；
    WAIT_BUYER_CONFIRM_GOODS (等待买家确认收货，即：卖家已发货) ；
    TRADE_SUCCESS（买家已签收以及订单成功）；
    TRADE_CLOSED（交易关闭）；
    PS：TRADE_PAID状态仅代表当前订单已支付成功，表示瞬时状态，稍后会自动修改成后面的状态。如果不关心此状态请再次请求详情接口获取下一个状态。*/

    private String orderStatus;

    /*订单状态描述*/
    private String orderStatusStr;

    /*主订单类型
0:普通订单; 1:送礼订单; 2:代付; 3:分销采购单; 4:赠品; 5:心愿单; 6:二维码订单; 7:合并付货款; 8:1分钱实名认证; 9:品鉴; 10:拼团; 15:返利; 35:酒店; 40:外卖; 41:堂食点餐; 46:外卖买单;
51:全员开店; 61:线下收银台订单; 71:美业预约单; 72:美业服务单; 75:知识付费; 81:礼品卡; 100:批发*/
    private Long orderType;

    /**
     * 支付类型
     0:默认值,未支付; 1:微信自有支付; 2:支付宝wap; 3:支付宝wap;
     5:财付通; 7:代付; 8:联动优势; 9:货到付款; 10:大账号代销; 11:受理模式;
     12:百付宝; 13:sdk支付; 14:合并付货款; 15:赠品; 16:优惠兑换; 17:自动付货款; 18:爱学贷;
     19:微信wap; 20:微信红包支付; 21:返利; 22:ump红包; 24:易宝支付; 25:储值卡; 27:qq支付; 28:有赞E卡支付;
     29:微信条码; 30:支付宝条码; 33:礼品卡支付; 35:会员余额; 72:微信扫码二维码支付; 100:代收账户;
     300:储值账户; 400:保证金账户; 101:收款码; 102:微信; 103:支付宝; 104:刷卡; 105:二维码台卡; 106:储值卡;
     107:有赞E卡; 110:标记收款-自有微信支付; 111:标记收款-自有支付宝; 112:标记收款-自有POS刷卡; 113:通联刷卡支付;
     200:记账账户; 201:现金
     */
    private Long payType;

    /*支付类型描述
    * 支付类型。取值范围： WEIXIN (微信自有支付) WEIXIN_DAIXIAO (微信代销支付) ALIPAY (支付宝支付)
    * BANKCARDPAY (银行卡支付) PEERPAY (代付) CODPAY (货到付款) BAIDUPAY (百度钱包支付) PRESENTTAKE (直接领取赠品)
    * COUPONPAY(优惠券/码全额抵扣) BULKPURCHASE(来自分销商的采购)
    * MERGEDPAY(合并付货款) ECARD(有赞E卡支付) PURCHASE_PAY (采购单支付)
    * MARKPAY (标记收款) OFCASH (现金支付) PREPAIDCARD (储值卡余额支付)
    * */
    private String payTypeStr;

    /*订单号*/
    private String tid;

    /*订单创建时间*/
    private Date createTime;


    public static class OrderItems{

        /**
         * 订单明细id
         */
        private String oid;

        /**
         * 订单类型
         0:普通类型商品; 1:拍卖商品; 5:餐饮商品; 10:分销商品; 20:会员卡商品; 21:礼品卡商品; 23:有赞会议商品; 24:周期购; 30:收银台商品; 31:知识付费商品; 35:酒店商品; 40:普通服务类商品; 182:普通虚拟商品; 183:电子卡券商品; 201:外部会员卡商品; 202:外部直接收款商品; 203:外部普通商品; 205:mock不存在商品; 206:小程序二维码
         */
        private Long itemType;

        /**
         * 商品id
         */
        private Long itemId;

        /**
         * 商品名称
         */
        private String title;

        /**
         * 商品数量
         */
        private Long num;

        /**
         * 商品优惠后总价
         */
        private Float totalFee;

        /**
         * 商品图片地址
         */
        private String picPath;

        public String getOid() {
            return oid;
        }

        public void setOid(String oid) {
            this.oid = oid;
        }

        public Long getItemType() {
            return itemType;
        }

        public void setItemType(Long itemType) {
            this.itemType = itemType;
        }

        public Long getItemId() {
            return itemId;
        }

        public void setItemId(Long itemId) {
            this.itemId = itemId;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public Long getNum() {
            return num;
        }

        public void setNum(Long num) {
            this.num = num;
        }

        public Float getTotalFee() {
            return totalFee;
        }

        public void setTotalFee(Float totalFee) {
            this.totalFee = totalFee;
        }

        public String getPicPath() {
            return picPath;
        }

        public void setPicPath(String picPath) {
            this.picPath = picPath;
        }
    }

    public static class Buyer{
        /**
         * 买家id
         */
        private Long buyerId;
        private String buyerPhone;

        /**
         * 粉丝id
         */
        private Long fansId;

        /**
         * 粉丝昵称
         */
        private String fansNickname;

        /**
         * 粉丝类型
         1:自有粉丝; 9:代销粉丝
         */
        private Long fansType;

        public Long getBuyerId() {
            return buyerId;
        }

        public void setBuyerId(Long buyerId) {
            this.buyerId = buyerId;
        }

        public String getBuyerPhone() {
            return buyerPhone;
        }

        public void setBuyerPhone(String buyerPhone) {
            this.buyerPhone = buyerPhone;
        }

        public Long getFansId() {
            return fansId;
        }

        public void setFansId(Long fansId) {
            this.fansId = fansId;
        }

        public String getFansNickname() {
            return fansNickname;
        }

        public void setFansNickname(String fansNickname) {
            this.fansNickname = fansNickname;
        }

        public Long getFansType() {
            return fansType;
        }

        public void setFansType(Long fansType) {
            this.fansType = fansType;
        }
    }

    public static class PayInfo{
        /**
         * 优惠前商品总价
         */
        private Float totalFee;

        /**
         * 最终支付价格
         payment=orders.payment的总和
         */
        private Float payment;

        /**
         * 有赞支付流水号
         */
        private String[] transaction;

        /**
         * 外部支付单号
         */
        private String[] outerTransactions;

        public Float getTotalFee() {
            return totalFee;
        }

        public void setTotalFee(Float totalFee) {
            this.totalFee = totalFee;
        }

        public Float getPayment() {
            return payment;
        }

        public void setPayment(Float payment) {
            this.payment = payment;
        }

        public String[] getTransaction() {
            return transaction;
        }

        public void setTransaction(String[] transaction) {
            this.transaction = transaction;
        }

        public String[] getOuterTransactions() {
            return outerTransactions;
        }

        public void setOuterTransactions(String[] outerTransactions) {
            this.outerTransactions = outerTransactions;
        }
    }

    public static class TradeSource{
        /**
         * 平台
         wx:微信; merchant_3rd:商家自有app; buyer_v:买家版; browser:系统浏览器; alipay:支付宝;qq:腾讯QQ; wb:微博; other:其他
         */
        private String platform;

        /**
         * 微信平台细分
         wx_gzh:微信公众号; yzdh:有赞大号; merchant_xcx:商家小程序; yzdh_xcx:有赞大号小程序; direct_buy:直接购买
         */
        private String wxEntrance;

        public String getPlatform() {
            return platform;
        }

        public void setPlatform(String platform) {
            this.platform = platform;
        }

        public String getWxEntrance() {
            return wxEntrance;
        }

        public void setWxEntrance(String wxEntrance) {
            this.wxEntrance = wxEntrance;
        }
    }

    public Buyer getBuyer() {
        return buyer;
    }

    public void setBuyer(Buyer buyer) {
        this.buyer = buyer;
    }

    public PayInfo getPayInfo() {
        return payInfo;
    }

    public void setPayInfo(PayInfo payInfo) {
        this.payInfo = payInfo;
    }

    public TradeSource getTradeSource() {
        return tradeSource;
    }

    public void setTradeSource(TradeSource tradeSource) {
        this.tradeSource = tradeSource;
    }

    public OrderItems[] getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(OrderItems[] orderItems) {
        this.orderItems = orderItems;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatusStr() {
        return orderStatusStr;
    }

    public void setOrderStatusStr(String orderStatusStr) {
        this.orderStatusStr = orderStatusStr;
    }

    public Long getOrderType() {
        return orderType;
    }

    public void setOrderType(Long orderType) {
        this.orderType = orderType;
    }

    public Long getPayType() {
        return payType;
    }

    public void setPayType(Long payType) {
        this.payType = payType;
    }

    public String getPayTypeStr() {
        return payTypeStr;
    }

    public void setPayTypeStr(String payTypeStr) {
        this.payTypeStr = payTypeStr;
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
